<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text">

    <script>
        var inp = document.querySelector('input');
        //整个文档  点击a键  表单自动获取焦点  
        document.addEventListener('keyup',function(event){
            var e = event || window.event;
            alert(e.keyCode)
            if(e.keyCode === 65){
                inp.focus(); //表单自动获取焦点 
            }
        })
    </script>
</body>
</html>